﻿using MongoDB.Driver;
using System;

namespace RuYiAdmin.Net.Service.BusinessService.MongoDBService
{
    /// <summary>
    /// MongoDB服务层接口
    /// </summary>
    public interface IMongoDBService
    {
        /// <summary>
        /// 获取业务集合
        /// </summary>
        /// <typeparam name="TDocument">TDocument</typeparam>
        /// <param name="collectionName">集合名称</param>
        /// <returns>业务集合</returns>
        IMongoCollection<TDocument> GetBusinessCollection<TDocument>(String collectionName);

        /// <summary>
        /// 获取MongoClient
        /// </summary>
        /// <returns>MongoClient</returns>
        MongoClient GetMongoDBClient();
    }
}
